The line-up functions here calculate the indentation for lines which start with an operator, by lining it up with something on the previous line.
Line up a continued argument. E.g:
foo (xyz, aaa + bbb + ccc + ddd + eee + fff); <- c-lineup-argcontOnly continuation lines like this are touched,
nilis returned on lines which are the start of an argument.Within a gcc
asmblock,:is recognized as an argument separator, but of course only between operand specifications, not in the expressions for the operands.Works with:
arglist-cont,arglist-cont-nonempty.
Line up lines starting with an infix operator under the open paren. Return
nilon lines that don't start with an operator, to leave those cases to other line-up functions. Example:if ( x < 10 || at_limit (x, <- c-lineup-arglist-operators list) <- c-lineup-arglist-operators returns nil )Since this function doesn't do anything for lines without an infix operator you typically want to use it together with some other lineup settings, e.g. as follows (the
arglist-closesetting is just a suggestion to get a consistent style):(c-set-offset 'arglist-cont '(c-lineup-arglist-operators 0)) (c-set-offset 'arglist-cont-nonempty '(c-lineup-arglist-operators c-lineup-arglist)) (c-set-offset 'arglist-close '(c-lineup-arglist-close-under-paren))Works with:
arglist-cont,arglist-cont-nonempty.
Line up the current line after the assignment operator on the first line in the statement. If there isn't any, return nil to allow stacking with other line-up functions. If the current line contains an assignment operator too, try to align it with the first one.
Works with:
topmost-intro-cont,statement-cont,arglist-cont,arglist-cont-nonempty.
Like
c-lineup-assignmentsbut indent withc-basic-offsetif no assignment operator was found on the first line. I.e. this function is the same as specifying a list(c-lineup-assignments +). It's provided for compatibility with old configurations.Works with:
topmost-intro-cont,statement-cont,arglist-cont,arglist-cont-nonempty.
Line up “cascaded calls” under each other. If the line begins with
->or.and the preceding line ends with one or more function calls preceded by the same token, then the arrow is lined up with the first of those tokens. E.g:r = proc->add(17)->add(18) ->add(19) + <- c-lineup-cascaded-calls offset; <- c-lineup-cascaded-calls (inactive)In any other situation
nilis returned to allow use in list expressions.Works with:
topmost-intro-cont,statement-cont,arglist-cont,arglist-cont-nonempty.
Line up C++ stream operators (i.e. ‘<<’ and ‘>>’).
Works with:
stream-op.
Line up a continued string under the one it continues. A continued string in this sense is where a string literal follows directly after another one. E.g:
result = prefix + "A message " "string."; <- c-lineup-string-cont
nilis returned in other situations, to allow stacking with other lineup functions.Works with:
topmost-intro-cont,statement-cont,arglist-cont,arglist-cont-nonempty.